Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Getting Started with a Aubo Robot
Description: This tutorial guides you through the process of establishing contact between ROS and a Aubo RobotTutorial Level: INTERMEDIATE
Prerequisites
In order to complete this tutorial, you should have access to the following:
- A computer with ROS installed (Indigo or Jade)
- Peak Can linux driver.
Package aubo_robot
This particular tutorial was tested on a Aubo robotic manipulator. The operating system based on Ubuntu 14.04(Supports both 32bit and 64bit version).
Overview
The aubo_robot metapackage communicates with hardware via Peak can tools, and also Ethernet connection.
Install necessary software
Peak can driver
- Install libpopt lib.
$sudo apt-get install libpopt-dev
Install peak can driver,download: http://www.peak-system.com/fileadmin/media/linux/
$tar -zxvf peak-linux-driver-8.1.tar.gz $cd peak-linux-driver-8.1 $make clean $make net=NO_NETDEV_SUPPORT $sudo make install
Catkin workspace
There are releases available for ROS Indigo. However, for the latest features and developments you might want to install from source.
First set up a catkin workspace (see http://wiki.ros.org/catkin/Tutorials).
Then clone the [https://github.com/aubo_robot] repository into the src/folder. Make sure to select the applicable branch before cloning (e.g. Indigo). It should look like /home/your/catkin_ws/src/aubo_robot.
Make sure to source the correct setup file according to your workspace hierarchy, then use catkin_make to compile.
If there is a linking dependency in aubo_driver with libev library. It is necessary to install it use sudo apt-get install libev-dev.
Move robot
Control real robot use pcan directly
- Make sure have installed Peakcan driver, connect peackcan to aubo robot i5, then run command,optional parameter(-S1,-S2,-S3) can control the joint move speed.
$rosrun aubo_control joint_control_pcan -S1
Note:default joint move speed is S1.
- A simple control panel in Rviz,run command line like this:
$roslaunch aubo_description aubo_i5_rviz.launch
Note:Choose PCAN bus interface, and select "Continuous move" mode.
- Then we can control 6 joints with press button "+" and "-".
Control real robot use TCP/IP Server
- Firstly,check the Robot Controller's IP address,for example 192.168.1.34,then ping 192.168.1.34,make sure is connected. run command line like this:
$roslaunch aubo_driver aubo_i5_bringup.launch robot_ip:=192.168.1.34
- Choose TCP/IP bus interface, and select "Move to Goal with AUBO Plan API "mode. Then we can adjust 6 joints position with press button "+" and "-",and also you can choose classic position. Then, push button "sendGoal".
Using MoveIt! with real robot in Rviz
There is a trajectory demo for this part use Peakcan Tool,also can use TCP/IP bus interface.
- Make sure have installed Peakcan driver, connect peackcan to aubo robot i5, then run command,optional parameter(-S1,-S2,-S3) can control the joint move speed.
$rosrun aubo_control joint_control_pcan -S1
Note:default joint move speed is S1.
For starting up Rviz with a configuration including the MoveIt! Motion Planning plugin run:
$roslaunch aubo_i5_moveit_config demo.launch
- Start up a trajectory generator,which receive goal and make trajectory,run:
$rosrun aubo_trajectory trajectory_gen
- Start up trajectory goal,subscribe trajectory points and publish to joint_control_pcan:
$rosrun aubo_trajectory trajectory_goal
- A control panel with real robot,run command:
$roslaunch aubo_description aubo_i5_rviz.launch
Using MoveIt! with simulated robot in Gazebo
- To bring up the simulated robot in Gazebo, run:
$roslaunch aubo_gazebo aubo_i5.launch
For setting up the MoveIt! nodes to allow motion planning ,run:
- make sure the follow context at aubo_i5_moveit_planning_execution.launch file:
"<remap if="$(arg sim)" from="/follow_joint_trajectory" to="/arm_controller/follow_joint_trajectory"/>"
$roslaunch aubo_i5_moveit_config aubo_i5_moveit_planning_execution.launch sim:=ture
- make sure the follow context at aubo_i5_moveit_planning_execution.launch file:
For starting up RViz with a configuration including the MoveIt! Motion Planning plugin run:
$roslaunch aubo_i5_moveit_config moveit_rviz.launch config:=true
RealTime Interface with a real robot
This new function use FollowJointTrajectoryAction server to control the AUBO-I5.
$roslaunch aubo_new_driver aubo_i5_bringup.launch robot_ip:=xxx.xxx.xxx.xxx
- or use ros control,
$roslaunch aubo_new_driver aubo_i5_ros_control.launch robot_ip:=xxx.xxx.xxx.xxx
- there are two example in "aubo_new_driver/test".
MoveIt!use ros control with a real robot
- Start up aubo new driver
$roslaunch aubo_new_driver aubo_i5_ros_control.launch robot_ip:=xxx.xxx.xxx.xxx
For setting up the MoveIt! nodes to allow motion planning run:
- make sure the follow context at aubo_i5_moveit_planning_execution.launch file:
"<remap if="$(arg sim)" from="/follow_joint_trajectory" to="/pos_based_pos_traj_controller/follow_joint_trajectory"/>"
$roslaunch aubo_i5_moveit_config aubo_i5_moveit_planning_execution.launch sim:=true
- make sure the follow context at aubo_i5_moveit_planning_execution.launch file:
For starting up Rviz with a configuration including the MoveIt! Motion Planning plugin run:
$roslaunch aubo_i5_moveit_config moveit_rviz.launch config:=true
- Drag the end effector of simulated Robot,then plan and excute.